package com.aisile.crowd_funding.common.controller;

import com.aisile.crowd_funding.system.pojo.SysUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class baseController {

   public Subject getSubject(){

       return SecurityUtils.getSubject();
   }

   public SysUser getUser(){

       return (SysUser)getSubject().getPrincipal();
   }

   public String getUserName(){

       return getUser().getUsername();
   }
}
